//
//  PersonModel.m
//  MY_IGList_demo
//
//  Created by mac on 2019/3/19.
//  Copyright © 2019 Yilian. All rights reserved.
//

#import "PersonModel.h"

@implementation PersonModel
- (instancetype)init{
    if (self = [super init]) {
        _name = @"ssss";
        _age = @"22";
        _desc = @"gooooo!";
        _arrOfM = @[@"!",@"@",@"#"];
    }
    return self;
}
- (nonnull id<NSObject>)diffIdentifier {
    NSString *str = [NSString stringWithFormat:@"%@%@",self.name,self.desc];
    return str;
}

- (BOOL)isEqualToDiffableObject:(nullable id<IGListDiffable>)object {
    if (object == self) {
        return YES;
    }
    PersonModel *model = (PersonModel *)object;
    
    return _name == model.name && _age == model.age && _desc == model.desc;
}

@end
